import React from 'react';
import AxCard from '@/components/AxBase/AxCard';
import './style.css'
import { AxCardListBx } from '@/components/AxCardList';
import { router } from 'umi';
import { message } from 'antd';

const Purchase: React.FC<any> = props => {


    /** 配置列 */
    const data1 = [
        {
            id: 1,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 2,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 3,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 4,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 5,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 6,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 7,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 8,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
        {
            id: 9,
            img: <img src='img/store.png' width={100} />,
            desc: (
                <div className="ent-member-card__info">
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            商家名称
                    </div>
                    </div>
                    <div className="ent-member-card__name" style={{ display: 'flex' }}>
                        <div className="ent-member-card__labels">
                            地址：地址地址地址地址地
                        </div>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系人：杭州马</span>
                    </div>
                    <div className="ent-member-card__description">
                        <span>联系电话：15828549799</span>
                    </div>
                </div>
            ),
            click: () => router.push({ pathname: '/buyer/material/goods/store/goods' }),
            actions: [{
                text: '查看资质',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                }
            }, {
                text: '关注',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    message.success('关注成功');
                }
            }, {
                text: '查看产品',
                click: (e: any) => {
                    if (e) e.stopPropagation();
                    router.push({ pathname: '/buyer/material/goods/store/goods' });
                }
            }]
        },
    ];

    return (
        <>
            <AxCard
                style={{ marginBottom: '15px', height: '100%', width: 1390, margin: '24px auto' }}
                bodyStyle={{ paddingLeft: 0, paddingRight: 0 }}
            >
                <AxCardListBx showAction={true} data={data1} />
            </AxCard>
        </>
    );
};

export default Purchase;